var CustomMaskScript= {
    MaskInputField: function (fieldName, format) {
        debugger;
        var control = Xrm.Page.getControl(fieldName);
        if (control != null && control.getControlType() == 'standard') {
            control.setFocus();
            if (Xrm.Page.getAttribute(fieldName).getAttributeType() == 'datetime') {
                var input = $("#" + fieldName + "_i").find("input");
                if (input != null)
                    input.mask(format);
            } else
                $("#" + fieldName + "_i").mask(format);
        }
    },
};